package com.itheima.health.dao;

import com.itheima.health.pojo.Order;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface OrderMapper extends Mapper<Order> {

    /**
     * @Author: JASON
     * @Date: 17:57 2021/1/15
     * @Parms []
     * @ReturnType: java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
     * @Description: 查询套餐对应得人数
    */
    List<Map<String,Object>> countBySetMeal();

    /**
     * @Author: JASON
     * @Date: 11:08 2021/1/16
     * @Parms [startDate, endDate, status :null 表示不作为查询条件]
     * @ReturnType: java.lang.Long
     * @Description:
     */
    Long countByOrderDateRange(@Param("startDate") Date startDate, @Param("endDate") Date endDate, @Param("status") String status);

    /**
     * @Author: JASON
     * @Date: 11:22 2021/1/16
     * @Parms [topN]  显示前几个
     * @ReturnType: java.util.Map<java.lang.String,java.lang.Object>
     * @Description: 统计套餐
    */
    List<Map<String,Object>> countByHotSetmeal(@Param("topN") int topN);
}
